<!--
 * @Author: your name
 * @Date: 2022-03-09 15:23:04
 * @LastEditTime: 2022-03-09 15:28:14
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \day09\9-鼠标事件.html
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #d1{
            width: 100%;
            height: 400px;
            background-color: aqua;
        }
    </style>
    <script>
        window.onload=function(){
            var div=document.getElementById('d1');
            div.ondblclick=function(event){
                console.log("我被双击了");
            }
            div.onmouseenter=function(){
                console.log('我移入鼠标');
            }
            div.onmouseleave=function(){
                console.log('我鼠标移除了');
            }
        }
    </script>
</head>
<body>
    <div id="d1">我是div</div>
</body>
</html>